% !TEX TS-program = lualatex
% !TEX encoding = UTF-8

% This is a simple template for a LuaLaTeX document using gregorio scores.

\documentclass[letterpaper,12pt]{article} % use larger type; default would be 10pt

% usual packages loading:
%\usepackage{luatextra}
%\usepackage{graphicx} % support the \includegraphics command and options
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % or letterpaper (US) or a5paper or....
\usepackage{gregoriotex} % for gregorio score inclusion
%\usepackage{fullpage} % to reduce the margins
\usepackage{anysize} % for marginsize
\usepackage{multicol} % for columns
\usepackage{lettrine} % for drop caps
\usepackage{fancyhdr} % for headers and footers
\usepackage{xstring}
%\usepackage{wrapfig} % for wrapping figures -- can't get it to work with gregorio

% choose the language of the document here
\usepackage[latin,american]{babel}

% use the two following package for using normal TeX fonts
\usepackage[T1]{fontenc}
\usepackage[utf8]{luainputenc}

% If you use usual TeX fonts, here is a starting point:
%\usepackage{palatino}
\usepackage{libertine}
%\input{glyphtounicode} \pdfglyphtounicode{f_f}{FB00} \pdfglyphtounicode{f_f_i}{FB03} \pdfglyphtounicode{f_f_l}{FB04}
%\pdfglyphtounicode{Q_u}{E048} \pdfglyphtounicode{O_e}{0152} \pdfglyphtounicode{o_e}{0153}
%\pdfgentounicode=1
\renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
%\usepackage{fontspec}
% to change the font to something better, you can install the kpfonts package (if not already installed). To do so
% go open the "TeX Live Manager" in the Menu Start->All Programs->TeX Live 2010
%\fontspec[Numbers=OldStyle]{Linux Libertine O}
\setgrefactor{17}
\input{../gsp-spaces}
%\def\greinitialformat#1{{\fontsize{37}{37}\selectfont #1}}
%small > footnotesize > scriptsize > tiny


% my stuff
\usepackage{../mypackage}
% end my stuff

\marginsize{40pt}{40pt}{30pt}{0pt}
\pagestyle{fancy} % no header or footers
\lhead{}\rhead{}\chead{6th Sunday after Epiphany}
\lfoot{}\cfoot{}\rfoot{}
%\renewcommand\headrulewidth{0pt}

% here we begin the document
\begin{document}

% The title:
\begin{center}{\Large Magnificat.}\end{center}

% Here we set the space around the initial.
% Please report to http://home.gna.org/gregorio/gregoriotex/details for more details and options
\setspaceafterinitial{6.2mm plus 0em minus 0em}
\setspacebeforeinitial{6.2mm plus 0em minus 0em}

% Here we set the initial font. Change 43 if you want a bigger initial.
\def\greinitialformat#1{%
{\fontsize{38}{38}\selectfont #1}%
}

% We set red lines here, comment it if you want black ones.
%\redlines

% We set VII above the initial.
{\gresetfirstlineaboveinitial{\small \textbf{At Magn.}}{\small \textbf{At Magn.}}
\setsecondannotation{\small \oldstylenums{ \textbf{Ant. 1. a3}}}

% We type a text in the top right corner of the score:
%\commentary{{\small \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}}

% and finally we include the score. The file must be in the same directory as this one.
\large \includescore{MagnificatAntiphon6Epiphany.tex}}%
\translation{The kingdom of heaven is like to leaven, which a woman took and hid in three measures of meal, until the whole was leavened.}
\hrule
\medianttermination{Mediant of 2 accents}{Termination of 1 accent with 2 preperatory syllables}

{\large
\includescore{MagnificatSimple1a3}
\newcounter{vcounter}
\begin{list}{\arabic{vcounter}.}{\setlength\itemsep{0pt}\usecounter{vcounter}\setlength\parsep{2pt}\setlength\labelwidth{50pt}\setlength\leftmargin{0pt}\setlength\itemindent{6ex}}
\setcounter{vcounter}{2}
\item Quia respéxit humilitátem an{\bf cíl}lae {\bf sú}æ : * ecce enim ex hoc beátam me dícent ómnes gene{\it ra}{\it ti}{\bf ó}nes.
\item Quia fécit míhi {\bf má}gna qui {\bf pó}tens est : * et sánctum {\it nó}{\it men} {\bf é}jus.
\item Et misericórdia éjus a progénie {\bf in} pro{\bf gé}nies * timén{\it ti}{\it bus} {\bf é}um.
\item Fécit poténtiam in {\bf brá}chio {\bf sú}o : * dispérsit supérbos ménte {\it cór}{\it dis} {\bf sú}i.
\item Depósuit po{\bf tén}tes de {\bf sé}de, * et exal{\it tá}{\it vit} {\bf hú}miles.
\item Esuriéntes im{\bf plé}vit {\bf bó}nis : * et dívites dimí{\it sit} {\it in}{\bf á}nes.
\item Suscépit Israel {\bf pú}erum {\bf sú}um, * recordátus misericór{\it di}{\it æ} {\bf sú}æ.
\item Sicut locútus est ad {\bf pá}tres {\bf nós}tros, * Abraham et sémini é{\it jus} {\it in} {\bf saé}cula
\item Glória {\bf Pá}tri, et {\bf Fí}lio, * et Spirí{\it tu}{\it i} {\bf Sán}cto.
\item Sicut érat in princípio, et {\bf núnc}, et {\bf sém}per, * et in saécula sæcu{\it ló}{\it rum}. {\bf A}men.
\end{list}
}

\hrule
\begin{center}{\Large Collect.}\end{center}
\prayer{Præsta, quaésumus omnípotens Deus :~\gredagger{} ut semper rationabília meditántes, * quæ tibi sunt plácita, et dictis exsequámur, et factis. Per Dóminum.}
{Grant, we beseech thee, Almighty God, that, striving always to act according to right reason, we may come, in every word and in every deed, to fulfill thy holy will. Through our Lord.}


\end{document}
